﻿
using System.Collections.Generic;

namespace Test30.Engine
{
    public abstract class CollectionDropBase<T>
    {
        public void Add(IDrop<T> drop, float odds)
        {
            _choices.Add(new DropChoice(drop, odds));
        }

        protected IList<DropChoice> Choices => _choices;

        protected class DropChoice
        {
            public IDrop<T> Drop;
            public float Odds;

            public DropChoice(IDrop<T> drop, float odds)
            {
                Drop = drop;
                Odds = odds;
            }
        }

        protected const float TotalOdds = 100.0f;

        private readonly List<DropChoice> _choices = new List<DropChoice>();
    }

}
